<template>
  <div>
    <input id="inputVal" type="text"  value="初始值"/>
    <button @click="busEmit">触发$bus</button>
  </div>
</template>

<script>
export default {
  methods: {
    busEmit() {
      const value = document.querySelector("#inputVal")?.value;
      this.$bus.$emit("busChange",value);
    },
  },
};
</script>

<style lang="scss" scoped></style>
